package com.pkk.alert.service.impl;

import cn.hutool.core.util.RandomUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 健康监测业务类
 *
 * @author peikunkun
 * @version V1.0
 * @date 2020-12-01 11:22
 **/
@Slf4j
@Service
public class HealthCheckBusinessService {

  @Autowired
  private AlertSupport alertSupport;

  public void handleCheckHealth() {
    String[] contents = {"是时候活动活动筋骨了", "你考虑过你脖子的感受吗？", "过去那么长时间难道不知道自己该做点什么？", "脖子:就给我30秒如何？", "脖子:敢不敢给我来一场上下左右舞?",
        "脖子:我需要锻炼了哦", "那你喝水了吗?", "哦,你个土拨鼠,开来喝水锻炼", "知道就去执行了,我就不说了"};

    String skipUrl = "https://mp.weixin.qq.com/s/TIv7pmuxgKEO7s3VF2t5OA";
    String title = "健康提醒";
    String context = contents[RandomUtil.randomInt(contents.length)];
    alertSupport.sendToDoGroup(title, context, "脖子锻炼", skipUrl);
  }


  /**
   * 饮食健康检测
   *
   * @return void
   * @Param
   * @author peikunkun
   * @date 2020/12/1 0001 上午 11:22
   * @since
   */
  public void handleHealthDietCheck() {
    String[] contents = {"这个点该点饭了吧", "你有没有点饭呀", "再不点饭就没得吃了", "现在还不点饭是想减肥吗?", "想不想吃饱饱,那还不点饭?", "去点饭吧,亲爱的", "给自己一个点饭的时间吧",
        "爱你呦,去点饭", "亲爱的,去点饭吧", "亲爱的,别忘了吃饭哦"};

    String title = "饮食提醒";
    String context = contents[RandomUtil.randomInt(contents.length)];
    alertSupport.sendToDoGroup(title, context, "外卖点餐", "");
  }
}
